package com.sir.tao.carhire.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sir.tao.carhire.dao.RoleDao;
import com.sir.tao.carhire.entity.table.AdministratorsRoleRelationEntity;
import com.sir.tao.carhire.entity.table.RoleEntity;
import com.sir.tao.carhire.service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author dyy
 * @data 2021/12/27 10:58
 * @description:
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleDao, RoleEntity> implements RoleService {

    @Resource
    private RoleDao roleDao;

    @Override
    public List<RoleEntity> getRolesByUserName(String username) {
        return roleDao.getRolesByUserName(username);
    }

    @Override
    public void saveBeach(List<AdministratorsRoleRelationEntity> administratorsRoleRelationEntities) {
        roleDao.saveBeach(administratorsRoleRelationEntities);
    }
}
